 <div class ="tomagrin"></div>
 <div class="btn-group">
 <?php foreach($toList as $v) {?>
  <button class="btn btn_tags btn_tags_<?php echo $v['info']['id']?>" tagid = "<?php echo $v['info']['id']?>"><?php echo $v['info']['name']?></button>
  <?php }  ?>
</div>

 <?php foreach($toList as $tagID => $v) {?>
<div class =" following_list  following_<?php echo$tagID ?>" style="display:none;" total="<?php echo $v['info']['total'] ?>">
   <?php foreach($v['list'] as $sv) {?>
	<div class ="friend_info" style ="float:left;">
		<a href="<?php echo $sv['url']?>" uid ="<?php echo $sv['uid']?>"> <img src="<?php echo $sv['avatar']?>" class="img-rounded" ></a>
	</div>
<?php } ?>

</div>

 <?php }  ?>
 
 
 <script language="javascript">

$(document).ready(function(){
	$('.following_0').css('display','block');
	$('.btn_tags_0').addClass('btn-warning');

	$('.btn_tags').click(function(){
		var tagid = $(this).attr('tagid');
		$('.btn_tags').each(function(){
			$(this).removeClass('btn-warning');
			});
		
		$('.btn_tags_'+tagid).addClass('btn-warning');

		$('.following_list').each(function(){
			$(this).css('display','none');
			});

		$('.following_'+tagid).css('display','block');


		var total = 0;
		$('.following_list').each(function(){
			if($(this).css('display') == "block")
			{
				total = $(this).attr('total');
			}
		});

		$('.need_score').empty();
		$('.need_score').append("<label>需要消耗的积分"+total*1+"</label>");
		
		});
});

</script>
